<template>
  <div class="navbar">
    <van-nav-bar
      :title="title"
      left-arrow
      @click-left="onClickLeft"
      :fixed="true"
      :placeholder="true"
    />
  </div>
</template>

<script setup>
import {useRouter,useRoute} from 'vue-router'
import {computed} from 'vue'
const router = useRouter()
const route = useRoute()

const title = computed(() => route.meta?.title ?? '做菜帮')
const onClickLeft = () => router.back();
</script>

<style lang="less" scoped>

</style>
